
   package  com.view.faculdade.professor.backbean;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;

import entity.*;


	public class NewProfessorBean {

	
	public NewProfessorBean() {
		           	}
	
        

				public List  professor = new ArrayList<ProfessorBean>();

		
	      

			public List  getProfessor() {

                        List selectItems = new ArrayList() ;
                        ProfessorBean userB = new ProfessorBean();
                        professor.add(userB);
                             for(int i = 0 ; i <  professor.size() ; i++){
                              ProfessorBean b = (ProfessorBean) professor.get(i);
                              selectItems.add(new SelectItem(i, b.getNome()+i , ""));

                             }

                          return selectItems;
                     }
                                




			
		

		public void setProfessor(List professor) {
			
			if (professor == null){
				return;
			}else{
				this.professor = professor;
			}

		}

		public void addProfessor(ActionEvent e){
                        ProfessorBean b = new ProfessorBean();
                                 this.professor.add(b);
			
		}
				

	
	
      

}